package com.cl.utility.constant;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author liddhappy
 * @description mock 随机值
 * @createTime 2022/12/7 22:54
 */
public enum MockRandomValue {
    STRING("字符串"),
    NAME("人名"),
    CITY("城市"),
    URL("网址"),
    EMAIL("邮箱"),
    IP("IP"),
    INTEGER("整数"),
    DECIMAL("小数"),
    DATE("日期"),
    TIMESTAMP("时间戳"),
    UNIVERSITY("大学"),
    PHONE("手机号"),
    UUID("唯一标识");
    private final String value;
        /**
         * 获取值列表
         *
         * @return
         */
        public static List<String> getValues() {
                return Arrays.stream(values()).map(MockRandomValue::getValue).collect(Collectors.toList());
        }

        public String getValue() {
                return value;
        }

        MockRandomValue(String value) {
        this.value = value;
    }

}
